/** 
 * Copyright (C), 2010-2012, TIETIAO Software Co.,Ltd. ALL RIGHTS RESERVED. 
 * File name:SearchServiceImpl.java
 * Version:1.0
 * Date:2011-12-20
 * Description: 搜索service
 * author:zhijian.zhang
 */
package com.tietiao.service.search;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.tietiao.dao.SearchLableStatisticsMapper;
import com.tietiao.dao.model.SearchLableStatistics;
import com.tietiao.dao.model.SearchLableStatisticsCriteria;

@Service
public class SearchServiceImpl implements SearchService {

	@Resource
	private SearchLableStatisticsMapper searchLableStatisticsMapper;

	@Override
	public List<SearchLableStatistics> getSearchLableStatistics() {
		SearchLableStatisticsCriteria searchLableStatisticsCriteria = new SearchLableStatisticsCriteria();
		SearchLableStatisticsCriteria.Criteria criteria = searchLableStatisticsCriteria
				.createCriteria();
		criteria.andCountGreaterThan(0);
		searchLableStatisticsCriteria.setOrderByClause("COUNT DESC");
		searchLableStatisticsCriteria.setLimit(20);
		return searchLableStatisticsMapper
				.selectByExample(searchLableStatisticsCriteria);
	}

}
